//
//  ImageOfButton.m
//  03-UI
//
//  Created by Snow on 16/7/18.
//  Copyright © 2016年 Snow. All rights reserved.
//

#import "ImageOfButton.h"

@implementation ImageOfButton
- (instancetype)initWithFrame:(CGRect)frame image:(UIImage *)image target:(nonnull id)target action:(nonnull SEL)action
{
    self = [super initWithFrame:frame];
    if (self) {
        self.image = image;
        self.userInteractionEnabled = YES;
        UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:target action:action];
        
        [self addGestureRecognizer:tap];
    }
    return self;
}


@end
